package manager

import (
	"github.com/gin-gonic/gin"
	"tadmin/app/manager"
)

// SystemRouter 系统路由
// 建议：
// 当接口数量超出一定范围，可适当分类或将复杂模块独立文件整理
// 路由规范：业务/模块/操作，比如：mall/user/add
type ManagerRouter struct{}

var (
	workerApi = &manager.WorkerApi{}
	sensorApi = &manager.SensorApi{}
)

// InitPrivateRouter 初始化私有路由
func (s *ManagerRouter) InitPrivateRouter(routerGroup *gin.RouterGroup) {

	//字典
	workerRouter := routerGroup.Group("/manager/worker")
	{
		workerRouter.POST("add", workerApi.Add)                     // 添加字典
		workerRouter.POST("query", workerApi.Query)                 // 字典查询
		workerRouter.POST("delete", workerApi.Delete)               // 字典查询
		workerRouter.POST("workPlaceList", workerApi.WorkPlaceList) // 字典查询
	}
	//字典
	sensorRouter := routerGroup.Group("/manager/sensor")
	{
		sensorRouter.POST("query", sensorApi.Query) // 字典查询
	}
}
